﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using FbKPI.Model;
using FbKPI.Controller;

namespace FbKPI.Facade
{
    public class UoMFacade
    {
        public string Save(UoM UoMs)
        {
            UoMController cont = new UoMController();
            return cont.Save(UoMs);
        }

        public string Delete(UoM UoMs)
        {
            UoMController cont = new UoMController();
            return cont.Delete(UoMs);
        }

        public string BeforeDelete(UoM UoMs)
        {
            UoMController cont = new UoMController();
            return cont.BeforeDelete(UoMs);
        }

        public IList<UoM> GetAll(string sSearch, int PageNumber, int DataLength, string SortCol, string SortDirection, out int TotalData)
        {
            IList<UoM> UoMs = new List<UoM>();
            UoMController cont = new UoMController();
            UoMs = cont.GetAll(sSearch, PageNumber, DataLength, SortCol, SortDirection, out TotalData);
            return UoMs;
        }

        public UoM GetUoMByID(int ID)
        {
            UoM UoMs = new UoM();
            UoMController cont = new UoMController();
            UoMs = cont.GetUoMByID(ID);
            return UoMs;
        }

        public UoM GetUoMByDescription(string Description)
        {
            UoM UoMs = new UoM();
            UoMController cont = new UoMController();
            UoMs = cont.GetUoMByDescription(Description);
            return UoMs;
        }
    }
}